/* This section warning the user with red tones */
.zettelkasten-flow__settings-developer-section {
  background-color: var(--background-modifier-error);
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
}
/*****************
*   ANIMATIONS
******************/
@keyframes fadeIn {
  from {
    opacity: 0.6;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.6;
  }
}
/*****************
*   BASIC STYLES
******************/
.zettelkasten-flow__is-leaf .zettelkasten-flow__icon * {
  fill: var(--background-modifier-success);
}

.zettelkasten-flow__visible-overflow {
  overflow: visible;
}

.zettelkasten-flow__display-grid {
  display: grid;
}

.zettelkasten-flow__invalid input {
  border: 1px solid var(--background-modifier-error) !important;
  box-shadow: 0.125rem 0.25rem var(--background-modifier-error);
}

.zettelkasten-flow__invalid label {
  color: var(--background-modifier-error) !important;
}

.zettelkasten-flow__group {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  gap: 0.5rem;
}

.zettelkasten-flow__input_group {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.zettelkasten-flow__input_group > div {
  margin-right: 10px;
}

.zettelkasten-flow__input_item {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 5px;
}

/*****************
*   NAVBAR
******************/

.zettelkasten-flow__navbar {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
}

.zettelkasten-flow__navbar_icons {
  display: flex;
  flex-wrap: nowrap;
  align-items: right;
  margin-right: 1rem;
}

.zettelkasten-flow__navbar_button_group {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  margin-right: 1rem;
}

.zettelkasten-flow__navbar_button_group > button {
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  padding: 0.25rem;
  margin-right: 0.5rem;
  background: linear-gradient(
        to bottom,
        var(--navbar-button-hover),
        var(--navbar-button-hover)
      )
      no-repeat,
    var(--button-initial-color);
  background-size: 100% 0;
  background-position: 0 100%;
  transition: background-size 0.2s ease-in-out,
    background-position 0.2s ease-in-out;
}

.zettelkasten-flow__navbar_button_group > button:hover {
  background-size: 100% 100%;
}

.zettelkasten-flow__navbar_skip_button {
  color: var(--interactive-accent);
  --navbar-button-hover: var(--interactive-accent-hover);
  --button-initial-color: var(--interactive-accent);
}

.zettelkasten-flow__navbar_build_button {
  color: var(--background-secondary);
  --navbar-button-hover: var(--background-modifier-error);
  --button-initial-color: var(--background-primary);
}
/*****************
*   SELECTOR MENU
******************/
.zettelkasten-flow__icon * {
  fill: var(--text-normal);
}

.zettelkasten-flow__header {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
}

.zettelkasten-flow__header p {
  text-align: center;
  size: var(--h2-size);
  font-weight: var(--h2-weight);
  color: var(--h2-color);
  margin-left: auto;
  margin-right: auto;
}
.zettelkasten-flow__header button {
  width: 3rem;
}

.zettelkasten-flow__header button:disabled {
  display: none;
}

.zettelkasten-flow__section {
  margin-bottom: 1rem;
}

.zettelkasten-flow__select-group input {
  margin-bottom: 0.5rem;
  border-radius: 0.25rem;
  display: none;
}

.zettelkasten-flow__option {
  background-color: rgba(var(--canvas-color), 0.25);
  border-color: rgba(var(--canvas-color), 0.5);
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  box-shadow: 0 0.125rem 0.25rem var(--color-accent);
  transition: all 0.2s ease-in-out;
}

.zettelkasten-flow__option:hover {
  border: 1px solid var(--input-shadow-hover);
  box-shadow: 0 0.5rem 1rem var(--color-accent);
}

.zettelkasten-flow__option label {
  margin-right: 10px;
}

.zettelkasten-flow__selected {
  border-color: var(--background-modifier-success);
  box-shadow: 0 0.125rem 0.25rem var(--background-modifier-success);
}

/*****************
*   BACKLINK
******************/
.zettelkasten-flow__backlink {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 0.5rem;
}

.zettelkasten-flow__backlink-left {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.zettelkasten-flow__backlink-left > div {
  margin-bottom: 1rem;
}

.zettelkasten-flow__backlink-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.zettelkasten-flow__backlink-right > div {
  margin-bottom: 1rem;
}

.zettelkasten-flow__preview {
  padding: 0.2rem;
  border: 1px solid var(--background-modifier-border);
  border-radius: 0.25rem;
}
/*****************
*   DROPDOWN
* .zettelkasten-flow__dropdown-group
******************/

/*****************
*   INPUT - TEXTAREA
******************/
.zettelkasten-flow__input-group {
  position: relative;
}

.zettelkasten-flow__input-group input,
textarea {
  border: solid 1.5px var(--background-secondary);
  border-radius: 0.25rem;
  background: none;
  padding: 1rem;
  font-size: 1rem;
  color: var(--text-normal);
  transition: border 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.zettelkasten-flow__input-label {
  color: var(--text-accent);
  pointer-events: none;
  transform: translateY(0.4rem);
  transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
  left: 15px;
  top: 0;
}

.zettelkasten-flow__input-group input:focus,
.zettelkasten-flow__input-group input:valid {
  outline: none;
  border: 1.5px solid var(--text-accent);
}

.zettelkasten-flow__input-group input:focus ~ .zettelkasten-flow__input-label,
.zettelkasten-flow__input-group input:valid ~ .zettelkasten-flow__input-label {
  transform: translateY(-50%) scale(0.8);
  background-color: var(--background-primary);
  padding: 0 0.2em;
  color: var(--text-normal);
}

.zettelkasten-flow__welcome-tutorial li {
  /* space between list items */
  padding-bottom: 0.35rem;
}
/*****************
*   SEARCH
******************/
.zettelkasten-flow__search-results {
  position: absolute;
  z-index: 9999;
  background-color: var(--background-secondary);
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--background-modifier-border);
  border-radius: 4px; /* rounded corners */
  box-shadow: 0 2px 5px var(--background-modifier-border); /* drop shadow */
  max-height: 200px;
  overflow-y: auto;
  transition: all 0.3s ease; /* smooth transition animation */
  animation: fadeIn 0.3s ease forwards; /* fade in animation */
}
.zettelkasten-flow__search-hidden {
  animation: fadeOut 0.3s ease forwards; /* fade out animation */
}

.zettelkasten-flow__search-selected {
  background-color: var(--color-accent);
  transition: background-color 0.3s ease; /* smooth transition animation on background-color */
}

.zettelkasten-flow__search-results li {
  padding: 8px 12px;
  cursor: pointer;
}

.zettelkasten-flow__search-results li:hover {
  background-color: var(--background-modifier-hover);
}

.zettelkasten-flow__search-results li:focus {
  outline: none;
  background-color: var(--background-modifier-focus);
}

/*****************
*   SETTINGS
******************/
.zettelkasten-flow__settings-item {
  border-top: 1px solid var(--background-modifier-border);
  background-color: var(--background-secondary);
  width: 100%;
  font-size: 16px;
  display: flex;
  align-items: flex-start;
  padding: 12px;
  color: var(--text-muted);
  justify-content: space-between;
}

.zettelkasten-flow__setting-button-group {
  display: flex;
  justify-content: flex-end;
  flex-grow: 1;
  flex-shrink: 0;
  max-width: 25px;
}

.zettelkasten-flow__setting-button-group > div {
  margin-left: 12px;
}

.zettelkasten-flow__settings-toggle-group > div {
  display: flex;
  align-items: center;
  line-height: 1;
  margin-bottom: 10px;
}

.zettelkasten-flow__settings-toggle-group .checkbox-container {
  margin-right: 10px;
}

.zettelkasten-flow__settings-toggle-group
  .zettelkasten-flow__setting-item-label {
  margin-bottom: 0;
}

/*****************
*   DRAG AND DROP
******************/
/** Flash animation when dragging over a dropzone */
@keyframes flashFrames {
  0% {
    opacity: 1;
  }
  25% {
    opacity: 0.75;
  }
  50% {
    opacity: 0.5;
  }
  75% {
    opacity: 0.75;
  }
  100% {
    opacity: 1;
  }
}

/** Just show the draggeable item */
.zettelkasten-flow__dragging {
  z-index: 9999;
  border: 2px solid var(--background-modifier-border);
  border-radius: 0.25rem;
  background-color: var(--background-secondary);
  box-shadow: 0 0.125rem 0.25rem var(--background-modifier-border);
}

.zettelkasten-flow__sortable {
  /* Support for mobile Drag & Drop */
  touch-action: none;
}
/********************
*   ACTION MANAGEMENT
*********************/
.zettelkasten-flow__actions-management-add {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 10px;
  padding: 10px;
  border-radius: 4px;
}
/*****************
*   ACCORDION
******************/
.zettelkasten-flow__accordion {
  border: 1px solid var(--background-secondary);
  border-radius: 4px;
  margin-bottom: 10px;
  transition: opacity 0.4s ease;
  opacity: 1;
}

.zettelkasten-flow__accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background-color: var(--color-accent);
  border-bottom: 1px solid var(--background-secondary);
  cursor: pointer;
}

.zettelkasten-flow__accordion-header-info {
  display: flex;
  align-items: center;
}

.zettelkasten-flow__accordion-header-info .zettelkasten-flow__input-group {
  margin-left: 10px;
}

.zettelkasten-flow__accordion-header-info label {
  margin-right: 10px;
}

.zettelkasten-flow__accordion-header-actions button {
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 10px;
}

.zettelkasten-flow__accordion-header-actions button:focus {
  outline: none;
}

.zettelkasten-flow__accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, opacity 0.2s ease-out;
  opacity: 0;
}

.zettelkasten-flow__accordion-body.open {
  max-height: 500em;
  opacity: 1;
  padding: 10px 15px;
}

/********************
*   SELECTABLE SEARCH
*********************/
.zettelkasten-flow__selectable-search {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 10px;
}

.zettelkasten-flow__selectable-search-header {
  display: inline-flex;
}

.zettelkasten-flow__selectable-search-header > button {
  border-radius: 0%;
  height: auto;
}

.zettelkasten-flow__selectable-search-header > button:hover {
  color: var(--background-modifier-error);
}

.zettelkasten-flow__selectable-pill-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  border: 1px solid var(--background-modifier-border);
}

.zettelkasten-flow__selectable-pill-group > input {
  border-radius: 0%;
  background-color: transparent;
  border: 0;
  width: 10%;
}

.zettelkasten-flow__selectable-pill-group > input:focus {
  outline: none;
  width: fit-content;
}

.zettelkasten-flow__selectable-pill {
  padding: 0.1em 0.2em;
  margin: 0.15em;
  background-color: var(--color-accent);
  border: 2px solid var(--background-modifier-focus);
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.zettelkasten-flow__selectable-pill:hover {
  background-color: var(--background-modifier-hover);
}

.zettelkasten-flow__selectable-pill button {
  background: none;
  border: none;
  cursor: pointer;
  margin-left: 5px;
  max-height: 1.2rem;
  max-width: 1.2rem;
  border-radius: 50%;
  background-color: var(--background-modifier-box-shadow);
}

.zettelkasten-flow__selectable-pill > button:hover {
  color: var(--background-modifier-error);
}

.zettelkasten-flow__selectable-search-results {
  position: relative;
}
